<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>

description("This test verifies that acquiring the 'style' attribute via a DOM Attr node still works correctly after the inline style has been modified through the CSSOM API.");

var e = document.createElement("span");
e.setAttribute("style", "background-color: white;");
var styleAttr = e.getAttributeNode("style");
shouldBe("styleAttr.value", "'background-color: white;'");
e.style.backgroundColor = 'green';
shouldBe("styleAttr.value", "'background-color: green;'");

e.style.backgroundColor = 'red';
var oldStyleAttr = e.setAttributeNode(document.createAttribute("style"));
shouldBe("oldStyleAttr.value", "'background-color: red;'");

</script>
</body>
</html>
